<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/12/10
  Time: 12:09
  To change this template use File | Settings | File Templates.
--%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>输出1~100的数字之和:</title>
</head>
<b>
<body>
<font size="6">
<c:set var="number" scope="page" value="0"></c:set>
<c:out value="1~100的数字之和是: " />
<c:forEach var="item" begin="1" end="100">
    <c:set var="number" value="${number+item}"/>
</c:forEach>
<c:out value="${number}"></c:out>
</font>
</body>
</b>
</html>
